<!--
描述：教学管理-专业信息-查看组件
开发人：hqj
开发日期：2018年7月31日
-->
<template lang="pug">
    kalix-dialog.user-add(bizKey="majorInfo" ref="kalixBizDialog" v-bind:formModel.sync="formModel" isView)
        div.el-form(slot="dialogFormSlot")
            el-form-item.s-flex(label="所属院(系)部名称" prop="treeId" v-bind:label-width="labelWidth")
                el-input(v-text="orgName")
            div.s-flex
                el-form-item.s-flex_item(label="专业代码" prop="code" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.code" readonly)
                el-form-item.s-flex_item(label="国标专业代码" prop="standardCode" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.standardCode" readonly)
            div.s-flex
                el-form-item.s-flex_item(label="中文名称" prop="cnName" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.cnName" readonly)
                el-form-item.s-flex_item(label="英文名称" prop="enName" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.enName" readonly)
            div.s-flex
                el-form-item.s-flex_item(label="所属学科" prop="subjectType" v-bind:label-width="labelWidth")
                    kalix-dict-select(v-model="formModel.subjectType" appName="admin" dictType="学科" disabled)
                el-form-item.s-flex_item(label="学制" prop="period" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.period" readonly)
            div.s-flex
                el-form-item.s-flex_item(label="培养层次" prop="trainingLevel" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.trainingLevel" readonly)
                el-form-item.s-flex_item(label="状态" prop="available" v-bind:label-width="labelWidth")
                    kalix-dict-select(v-model="formModel.available" appName="admin" dictType="状态" disabled)
            div.s-flex
                el-form-item.s-flex_item(label="授予学位" prop="degree" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.degree" readonly)
                el-form-item.s-flex_item(label="师范类" prop="normalClass" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.normalClass" readonly)
            div.s-flex
                el-form-item.s-flex_item(label="允许辅修" prop="minorRepair" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.minorRepair" readonly)
                el-form-item.s-flex_item(label="设置年份" prop="settingYear" v-bind:label-width="labelWidth")
                    kalix-date-picker.kalix-date(v-model="formModel.settingYear" type="year" readonly)
            el-form-item.s-flex(label="专业简介" prop="introduction" v-bind:label-width="labelWidth")
                el-input(v-model="formModel.introduction" type="textarea" readonly)
</template>

<script type="text/ecmascript-6">
    import FormModel from './model'

    export default {
        name: 'MajorInfoView',
        data() {
            return {
                formModel: Object.assign({}, FormModel),
                orgName: '',
                labelWidth: '140px'
            }
        },
        methods: {
            init(dialogOption) {
                this.orgName = dialogOption.orgName
            }
        }
    }
</script>
